package com.itany.boot.service;

import com.github.pagehelper.PageInfo;
import com.itany.boot.entity.CourseType;
import com.itany.boot.exception.CourseTypeExistException;
import com.itany.boot.exception.LevelErrorException;
import com.itany.boot.exception.RequestParameterErrorException;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @date 2025/10/13
 */
@Service
public interface CourseTypeService {

    PageInfo<CourseType> findChileByParentId(String parentId, String pageNo, String pageSize);

    void addChileType(String typeName, String parentId) throws RequestParameterErrorException, CourseTypeExistException, LevelErrorException;

    void modifyChileStatus(String parentId, String chileStatus) throws RequestParameterErrorException;

    int getLevel(String level) throws RequestParameterErrorException;

    void addCourseType(String name) throws RequestParameterErrorException, CourseTypeExistException;

    PageInfo<CourseType> findPage(String pageNo, String pageSize);

    CourseType findById(String id) throws RequestParameterErrorException;

    void modifyName(String id,String typeName) throws RequestParameterErrorException, CourseTypeExistException;

    void modifyStatus(String id,String status) throws RequestParameterErrorException;
    
    List<CourseType> selectByParentId(String parentId);

    List<CourseType> findEnabled();

    List<CourseType> findAll();
}
